﻿using DapperExtensions.Mapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DapperExt.Web.Models
{
    /// <summary>
    /// x_roleEntity角色:实体类(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class x_roleEntity
    {
        /// <summary>
        /// 
        /// </summary>
        public x_roleEntity()
        { }
        #region Model
        private int _id;
        private string _rolecode;
        private string _rolename;
        private string _remark;
        private int? _status = 0;
        private DateTime? _createon;
        private DateTime? _updateon;
        private int? _createby = 0;
        private int? _updateby = 0;
        /// <summary>
        /// Id自增主键
        /// </summary>
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 角色编码
        /// </summary>
        public string RoleCode
        {
            set { _rolecode = value; }
            get { return _rolecode; }
        }
        /// <summary>
        /// 角色描述
        /// </summary>
        public string RoleName
        {
            set { _rolename = value; }
            get { return _rolename; }
        }
        /// <summary>
        /// 角色备注
        /// </summary>
        public string Remark
        {
            set { _remark = value; }
            get { return _remark; }
        }
        /// <summary>
        /// 状态(1有效0无效)
        /// </summary>
        public int? Status
        {
            set { _status = value; }
            get { return _status; }
        }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateOn
        {
            set { _createon = value; }
            get { return _createon; }
        }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateOn
        {
            set { _updateon = value; }
            get { return _updateon; }
        }
        /// <summary>
        /// 创建者
        /// </summary>
        public int? CreateBy
        {
            set { _createby = value; }
            get { return _createby; }
        }
        /// <summary>
        /// 修改者
        /// </summary>
        public int? UpdateBy
        {
            set { _updateby = value; }
            get { return _updateby; }
        }
        #endregion Model
    }

    /// <summary>
    /// 实体对象映射关系  
    /// </summary>
    [Serializable]
    internal class x_roleEntityMapper : ClassMapper<x_roleEntity>
    {
        public x_roleEntityMapper()
        {
            base.Table("x_role");
            // Map(f => f.Id).Key(KeyType.Identity);
            // AutoMap();
        }
    }
}